tests: Install testsuite/css
authorBenjamin Otte <otte@redhat.com>
Tue, 21 May 2013 10:37:49 +0000 (12:37 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 21 May 2013 11:11:10 +0000 (13:11 +0200)
testsuite/css/Makefile.am
testsuite/css/api.test.in [new file with mode: 0644]

index cd5b0d6704c3fc725178f8fd5d89827656b44f2d..4275b2742e09b44bdb752b7510f3ef7654580cb7 100644 (file)
@@ -1,8 +1,11 @@
 include $(top_srcdir)/Makefile.decl
 
+NULL =
+
 SUBDIRS = parser
 
 check_PROGRAMS = $(TEST_PROGS)
+test_in_files =
 
 AM_CPPFLAGS =                          \
        -I$(top_srcdir)                 \
@@ -20,5 +23,25 @@ LDADD = \
        $(GTK_DEP_LIBS)
 
 TEST_PROGS += api 
+test_in_files += api.test.in
+
+if BUILDOPT_INSTALL_TESTS
+insttestdir=$(pkglibexecdir)/installed-tests/css
+insttest_PROGRAMS = $(TEST_PROGS)
+
+substitutions = \
+       -e s,@pkglibexecdir\@,$(pkglibexecdir),g \
+       $(NULL)
+
+test_files = $(test_in_files:.test.in=.test)
+
+$(test_files): %.test: %.test.in
+       $(AM_V_GEN) sed $(substitutions) $< > $@.tmp && mv $@.tmp $@
+
+EXTRA_DIST += $(test_in_files)
+
+testmetadir = $(datadir)/installed-tests/$(PACKAGE)/css
+testmeta_DATA = $(test_files)
+endif
 
 -include $(top_srcdir)/git.mk
diff --git a/testsuite/css/api.test.in b/testsuite/css/api.test.in
new file mode 100644 (file)
index 0000000..7966f5a
--- /dev/null
@@ -0,0 +1,3 @@
+[Test]
+Exec=@pkglibexecdir@/installed-tests/css/api
+Type=session